<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title> 查看打款详情</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/xadmin.css">
    <script type="text/javascript" charset="utf-8" src="/static/js/jquery-1.11.3.min.js"></script>
    <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/js/xadmin.js"></script>
</head>
<body>
<div class="x-body">
    <table class="layui-table">
        <tbody>
        <tr>
            <td>单号:</td>
            <td>${model.psd!}</td>
        </tr>
        <tr>
            <td>金额:</td>
            <td>${model.price!}</td>
        </tr>
        <tr>
            <td>标题:</td>
            <td>${model.title!}</td>
        </tr>
        <tr>
            <td>IP地址:</td>
            <td>${model.ip!}</td>
        </tr>
        <tr>
            <td>方式:</td>
            <td><%if(model.pType! ==1){%>微信<%}else if(model.pType! ==2){%>支付宝<%}else{%>QQ钱包<%}%></td>
        </tr>
        <tr>
            <td>时间:</td>
            <td>${model.optTime!,dateFormat='yyyy-MM-dd HH:mm:ss'}</td>
        </tr>
        <tr>
            <td>状态:</td>
            <td><%if(model.status! == 2){%>成功<%}else if(model.status! == 1){%>等待中<%}else{%>失败<%}%></td>
        </tr>
        <tr>
            <td>流水ID:</td>
            <td>${model.trano!}</td>
        </tr>
        <tr>
            <td>系统返回:</td>
            <td>${model.errorInfo!}</td>
        </tr>
    </table>
    <div style="text-align: center;">
        <%if(model.status! == 3){%>
        <button class="layui-btn layui-btn-normal" onclick="open_url('${model.id!}')">重新打款</button>
        <%}%>
        <%if(model.status! == 1){%>
        <button class="layui-btn layui-btn-normal" onclick="open_url('${model.id!}')">打款</button>
        <%}%>
        <button class="layui-btn layui-btn-warm" onclick="x_admin_close()">关&nbsp;&nbsp;闭</button>
    </div>

</div>
</body>
<script>

    $(function () {
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            //执行一个laydate实例
            laydate.render({
                elem: '#start' //指定元素
            });
            //执行一个laydate实例
            laydate.render({
                elem: '#end' //指定元素
            });
        });
    });

    function open_url(id) {
        $.post("/admin/pf/re/tr", {"id": id}, function (data) {
            layer.alert(data.msg, {icon: 6}, function () {
                window.parent.location.reload();
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            });
        }, "json");
    }

</script>
</html>